<template>
  <el-form-item label="触发距离">
    <el-radio-group v-model="editorForm.offset.isDefault" @change="handleDefault">
      <el-radio :label="true">默认</el-radio>
      <el-radio :label="false">自定义</el-radio>
    </el-radio-group>
    <div v-if="!editorForm.offset.isDefault" class="custom-after">
      <el-input v-model="editorForm.offset.value" type="number" @change="backUpdate" />
    </div>
  </el-form-item>
</template>

<script setup>
import { inject } from 'vue'

const { editorForm, backUpdate, changeDefault } = inject('commonForm')
const handleDefault = () => {
  changeDefault('offset')
  backUpdate()
}
</script>

<style lang='scss' scoped></style>